﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DepInnerTask.aspx.cs" Inherits="Ultimus.Web.DepInnerTask" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <link href="CSS/style.css" rel="stylesheet" rev="stylesheet" />
    <link href="CSS/global.css" rel="stylesheet" rev="stylesheet" />
    <script src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        function CheckNull() {
            var taskNo = document.getElementById("txtNo").value;
            var taskTitle = document.getElementById("txtTitile").value;
            var taskrepUsers = document.getElementById("txtRepUsers").value;
            var taskFaqi = document.getElementById("txtFaqi").value;
            var taskFaDate = document.getElementById("txtFaDate").value;
            var taskTaskDes = document.getElementById("txtTaskDes").value;
            if (taskNo == "") {
                alert("工单编号不能为空！");
                document.getElementById("txtNo").focus();
                return false;
            }
            if (taskTitle == "") {
                alert("工单标题不能为空！");
                document.getElementById("txtTitile").focus();
                return false;
            }
            if (taskrepUsers == "") {
                alert("处理人不能为空！");
                document.getElementById("txtRepUsers").focus();
                return false;
            }
            if (taskFaqi == "") {
                alert("发起人不能为空！");
                document.getElementById("txtFaqi").focus();
                return false;
            }
            if (taskFaDate == "") {
                alert("发起时间不能为空！");
                document.getElementById("txtFaDate").focus();
                return false;
            }
            if (taskTaskDes == "") {
                alert("任务描述不能为空！");
                document.getElementById("txtTaskDes").focus();
                return false;
            }
        }
        function CheckFile() {
            var file = document.getElementById("file").value;
            if (file == "") {
                alert("请选择附件！");
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
  
        <table style="border: 1px solid; font-size:12px; width:700px;" class="listTable3">
            <tr>
                <td style=" font-size:15px">
                    派发部内工单</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                        工单编号：<span style="color:Red;">*</span><asp:TextBox ID="txtNo" runat="server" MaxLength="20"></asp:TextBox>     
                </td>
                <td>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 工单标题：<span style="color:Red;">*</span> <asp:TextBox ID="txtTitile" runat="server" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;&nbsp; 处理人：<span style="color:Red;">*</span> <asp:TextBox ID="txtRepUsers" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;&nbsp; 抄送人：&nbsp;&nbsp; <asp:TextBox ID="txtCopyToUsers" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    通知渠道：<asp:CheckBox ID="chkMess" runat="server" Text="短信" />
                    <asp:CheckBox ID="chkEmail" runat="server"  Text="外网邮件" />
                </td>
                <td>
                    要求回复时间：&nbsp; <asp:TextBox ID="txtRepDate" runat="server" onClick="WdatePicker()"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;&nbsp; 发起人：<span style="color:Red;">*</span> <asp:TextBox ID="txtFaqi" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发起时间：<span style="color:Red;">*</span> <asp:TextBox ID="txtFaDate" runat="server" onClick="WdatePicker()"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    消息内容：&nbsp; <asp:TextBox ID="txtMess" runat="server" Height="46px" 
                        TextMode="MultiLine" Width="266px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr><td >
                <asp:LinkButton ID="lkbtnTask" runat="server" ForeColor="Blue">原任务信息</asp:LinkButton></td><td></td></tr>
            <tr>
                <td>
                    任务描述：<span style="color:Red;">*</span><asp:TextBox ID="txtTaskDes" runat="server" Height="46px"  MaxLength="1000"
                        TextMode="MultiLine" Width="266px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 附件： <asp:FileUpload ID="file" runat="server" />
                </td>
                <td>
                    <asp:Button ID="btnUpload" runat="server" Text="上传附件" class="btnBg"
                        onclick="btnUpload_Click"  OnClientClick="return CheckFile();"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:GridView ID="gvUpLoadFile" runat="server"  onrowdatabound="gvUpLoadFile_RowDataBound"  DataKeyNames="UPLOAD_FILE_ID"
             onrowdeleting="gvUpLoadFile_RowDeleting" width="600px" AutoGenerateColumns="False" 
                        >
                        <Columns>
                            <asp:BoundField DataField="UPLOAD_FILE_ID" Visible="False" />
                            <asp:BoundField DataField="FILE_NAME" HeaderText="文件名称" />
                            <asp:BoundField DataField="UPLOAD_BY" HeaderText="上传人" />
                            <asp:BoundField DataField="UPLOAD_DATE" HeaderText="上传时间" />
                            <asp:CommandField ShowDeleteButton="True" />
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnOk" runat="server" Text="确定派发"  class="btnBg"
                        OnClientClick="return CheckNull();" onclick="btnOk_Click"/>
                    <asp:Button ID="btnCancle" runat="server" Text="取消" class="btnBg" />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
  
    </div>
    <asp:HiddenField ID="hidGuid" runat="server" />
    </form>
</body>
</html>
